import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
import base from '@/assets/JS/base.js';
import '@/assets/SCSS/animate.min.css';//animate动画库
import '@/assets/JS/flexible.js';//适配方案
Vue.use(ElementUI);
//引入vue全局
Vue.prototype.$base=base;
Vue.config.productionTip = false
// 数字三位加逗号过滤器
Vue.filter('numberFormat', (value) => {
  if(value !== undefined && value !== null) {
    let str = value.toString();
    let reg = str.indexOf('.') > -1 ? /(\d)(?=(\d{3})+\.)/g : /(\d)(?=(?:\d{3})+$)/g;
    return str.replace(reg, '$1,');
  } else {
    return  '';
  }
});

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
